from celery import Celery

# 为我们的项目myproject创建一个Celery实例
app = Celery('myemail', broker='redis://127.0.0.1:6379/0')

# 这里指定从django的settings.py里读取celery配置
app.config_from_object('tasks.celeryconfig')

# 自动从文件中加载任务
app.autodiscover_tasks(['tasks.async_tasks'])
